package com.sangfor.ssl.service.https;

import java.io.InputStream;

/* loaded from: classes2.dex */
public class HttpResponse {
    private static final String TAG = "HttpResponse";
    private HttpInputStream mInputStream;
    private final long mNativePtr;

    private static native String getHeadersNative(long j);

    private static native long getInputStreamNative(long j);

    private static native long getResponseCodeNative(long j);

    private static native String getResponseNative(long j);

    /* JADX INFO: Access modifiers changed from: package-private */
    public HttpResponse(long j) {
        this.mNativePtr = j;
    }

    public long getResponseCode() {
        return getResponseCodeNative(this.mNativePtr);
    }

    public String getHeaders() {
        return getHeadersNative(this.mNativePtr);
    }

    public String getResponse() {
        return getResponseNative(this.mNativePtr);
    }

    public InputStream getInputStream() {
        if (this.mInputStream == null) {
            long inputStreamNative = getInputStreamNative(this.mNativePtr);
            if (inputStreamNative != 0) {
                this.mInputStream = new HttpInputStream(inputStreamNative);
            }
        }
        return this.mInputStream;
    }
}
